<template>
    <h1>我是MyHome组件{{message}}--我的ID是{{id}}</h1>
</template>
<script>
export default {
    data(){
        return{
            message:"的数据",
            id:''
        }
    },
    beforeRouteEnter(to,from,next){
        console.log("beforeRouteEnter",to,from);
        next()
    },
    created(){
        console.log(this.$route);
        this.id=this.$route.params.id
    }
}
</script>